list comprehension hackerrank solution